const routes = [
    {
        path: "/home",
        component: () => import("@/views/Home/index.vue"),
        children: [
            {
                path: 'music',
                component: () => import("@/views/Home/Music/index.vue"),
                children: [
                    {
                        path: "detail/:name",
                        component: () => import("@/views/Home/Detail/index.vue"),
                        name: "detailMusic"
                    }
                ]
            },
            {
                path: 'news',
                component: () => import("@/views/Home/News/index.vue"),
                children: [
                    {
                        path: "detail/:name",
                        component: () => import("@/views/Home/Detail/index.vue"),
                        name: "detailNews"
                    }
                ]
            },
            {
                path: "",
                redirect: "/home/music"
            }
        ]
    },
    {
        path: "/about",
        component: () => import("@/views/About/index.vue")
    },
    {
        path: "/count",
        component: () => import("@/views/Count/index.vue")
    },
    {
        path: "/communication",
        component: () => import("@/views/Communication/index.vue"),
        children: [
            {
                path: "event",
                component: () => import("@/views/Communication/Event/index.vue"),
            },
            {
                path: "pubsub",
                component: () => import("@/views/Communication/PubSub/index.vue"),
            },
            {
                path: "vmodel",
                component: () => import("@/views/Communication/VModel/index.vue"),
            },
            {
                path: "attr",
                component: () => import("@/views/Communication/Attr/index.vue"),
            },
            {
                path: "ref",
                component: () => import("@/views/Communication/Ref/index.vue"),
            },
            {
                path: "parent",
                component: () => import("@/views/Communication/Parent/index.vue"),
            },
        ],
    },
    {
        path: "/",
        redirect: "/home"
    }
]

export default routes